#pragma once

#include "dsegen.h"
#include "RegionObject.h"

namespace dhis
{
	//----------------------------------------------------------------------------------
	class CBlockVertical
	{
	public:
		CBlockVertical(const int& w, const int& h, const int& div = 2048);
		~CBlockVertical(void);
	public:
		inline int Width() const { return m_width; }
		inline int Height() const { return m_height; }
		inline int BlockWidth() const { return m_blockWidth; }
		inline int BlockCol() const { return m_blockCol; }

		inline int GetBlockCount() const { return m_rects.size(); }
		inline CRectI& GetBlockRect(const int& idx) { return m_rects[idx]; }
		inline ObjectMap& GetBlockObjects(const int& idx) { return m_blockObjs[idx]; }
	private:
		int m_width;
		int m_height;
		int m_blockWidth;
		int m_blockCol;
		std::vector<CRectI> m_rects;
		std::vector<ObjectMap> m_blockObjs;
	};

}